﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <script src="css/student_chartline_js5.js"></script>
    <script src="css/studentchartline_js1.js"></script>
    <script src="css/studentchartline_js2.js"></script>
    <script src="css/studentchartline_js3.js"></script>
    <script src="css/studentchartline_js4.js"></script>
    <script src="../../backstage/lib/jquery/1.9.1/jquery.js"></script>
    <title>炽热教育学习曲线图</title>
</head>
<body onload="getIndexNumberManager()">
     <div id="container" style="max-width:800px;height:400px"></div> 
</body>
    <script>
        function getIndexNumberManager() {
           
            $.ajax({
                url: '../../ChireInter/Exam/Exam_Chart_List.ashx',
                data: {},
                type: 'post',
                dataType: 'json',
                success: function (res) {
                    if (res.errCode == 200) {
                        var seriesArr = [];
                        var html = "";
                        for (var i in res.data.chartList) {

                            var name = res.data.chartList[i].studentModel.name;

                            var singleStudent = { name: name, data: res.data.chartList[i].info };
                            var dateList = res.data.dateList;
                            seriesArr.push(singleStudent);
                        }
                        showchat(res, seriesArr, dateList);
                     
                    } else {
                        alert('提交失败')
                    }
                },
                error: function (err) {

                }
            })
        }

        function showchat(res, seriesArr, dateList) {
        var chart = Highcharts.chart('container', {
            title: {
                text: '炽热教育'
            },
            subtitle: {
                text: '数据来源：www.chire.net'
            },
            yAxis: {
                title: {
                    text: '分数'
                },
                plotLines: [{
                    value: 0,
                    width: 1,
                    color: '#808080'
                }]
            },
            legend: {
                layout: 'vertical',
                align: 'right',
                verticalAlign: 'middle'

            },
            tooltip: {
                valueSuffix: '分'
            },
            plotOptions: {
                series: {
                    label: {
                        connectorAllowed: false
                    },
                    pointStart: 2010
                }
            },
            series: seriesArr,
            
            credits: {
                enabled:false
            },
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

   
    </script>
</html>
